# 第51题

# 问题：定义一个名为American的类及其子类NewYorker。

# 提示：使用类子类(ParentClass)来定义子类。


class American:
    height:int
    name:str
    weight:int
    def __init__(self, height, weight, name) -> None:
        self.height = height
        self.name = name
        self.weight = weight

class NewYorker(American):
    my_location:str
    def __init__(self, height, weight, name) -> None:
        self.my_location = 'NewYork'
        super().__init__(height, weight, name)
    def say_hello(self):
        print("Hello, I am {} from {}".format(self.name, self.my_location))

if __name__ == '__main__':
    john = NewYorker(180, 150, 'john')
    john.say_hello()



